package com.letoo.dragon.dataaccess.datasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * spring动态数据源重写，保证每次query都可以设定自己要的数据源
 * 
 * @author dengjie
 *
 */
public class DynamicDataSource extends AbstractRoutingDataSource {

    @Override
    protected Object determineCurrentLookupKey() {
        return DynamicDataSourceHolder.getDataSouce();
    }

}
